﻿function NewOpenBySize(url, target, width, height) {
    var tt, w, left, top;
    if (!width) width = screen.width;
    if (!height) height = screen.height - 60;
    left = (screen.width - width) / 2;
    if (left < 0) { left = 0; }

    top = (screen.height - 60 - height) / 2;
    if (top < 0) { top = 0; }

    tt = "toolbar=no, menubar=no, scrollbars=yes,resizable=no,location=no, status=no,";
    tt = tt + "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top;
    //alert(tt);
    w = window.open(url, target, tt);
    try {
        w.focus();
    } catch (e) { }
}